package com.cleaningcloud.erp.api;

import com.cleaningcloud.common.core.constant.SecurityConstants;
import com.cleaningcloud.common.core.constant.ServiceNameConstants;
import com.cleaningcloud.common.core.web.domain.AjaxResult;
import com.cleaningcloud.erp.api.domain.ErpCommodityStockAlter;
import com.cleaningcloud.erp.api.factory.RemoteCommodityFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 商品服务
 *
 * @author
 */
@FeignClient(contextId = "remoteCommodityService", value = ServiceNameConstants.ERP_SERVICE, fallbackFactory = RemoteCommodityFallbackFactory.class)
public interface RemoteCommodityService {


    /**
     * 新增库存商品变更记录
     *
     * @param erpCommodityStockAlter 库存商品变更
     * @return 结果
     */
    @RequestMapping("/alter/add")
    AjaxResult addWare(@RequestBody ErpCommodityStockAlter erpCommodityStockAlter, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
